import statistics as stt

data = [1.5, 2.5, 2.5, 2.75, 3.25, 4.75]
# 标准差stdev
ret=stt.stdev(data)
print(f"标准差stdev:{ret}")
# 方差
ret=stt.variance(data)
print(f"方差variance:{ret}")

# 总体标准差
ret=stt.pstdev(data)
print(f"总体方差pstdev:{ret}")
# 总体方差
ret=stt.pvariance(data)
print(f"总体方差pvariance:{ret}")

'''
标准差stdev:1.0810874155219827
方差variance:1.16875
总体方差pstdev:0.986893273527251
总体方差pvariance:0.9739583333333334
'''